//
//  RootViewController.m
//  MusicNews
//
//  Created by lanou3g on 15/10/13.
//  Copyright © 2015年 LC.J. All rights reserved.
//

#import "RootViewController.h"
#import "NewsViewController.h"
#import "PicturesViewController.h"
#import "MusicViewController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.tabBar.backgroundImage = [UIImage imageNamed:@"tabBarbackgroudimagetru375x49"];
    
    NewsViewController *newsVC = [[NewsViewController alloc]init];
    [self addChildViewController:newsVC];
    UINavigationController *newC = [[UINavigationController alloc] initWithRootViewController:newsVC];
    newC.navigationItem.title= @"新闻列表";
    
    
    newsVC.tabBarItem.title = @"新闻";
    newsVC.tabBarItem.image = [[UIImage imageNamed:@"news"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)];
    
    
    
    
    PicturesViewController *picVC = [[PicturesViewController alloc]init];
    picVC.tabBarItem.image = [[UIImage imageNamed:@"tabbar_picture_normal@2x"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    picVC.tabBarItem.selectedImage = [[UIImage imageNamed:@"tabbar_picture_selected@2x"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
    UINavigationController *picNav = [[UINavigationController alloc]initWithRootViewController:picVC];
    picNav.navigationBar.translucent = YES;
    picNav.tabBarItem.title = @"美图";
    [self addChildViewController:picNav];
    
    
    
    MusicViewController *musicVC = [[MusicViewController alloc]init];
    [self addChildViewController:musicVC];
    
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
